package com.wipz.eoa.iphone.officedocument;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.wipz.eoa.iphone.BaseAction;

/**
 * 收文/发文管理控制类
 * @author 张涛
 * @date 2012-2-10
 */

public class ArchiveAction extends BaseAction {
	
	private static final long serialVersionUID = 1L;
	private IArchiveService archiveService;
	private List list;
	private Object view;
	private List sendList;
	private Object sendDetail;

	
	public List getSendList() {
		return sendList;
	}

	public void setSendList(List sendList) {
		this.sendList = sendList;
	}

	public Object getSendDetail() {
		return sendDetail;
	}

	public void setSendDetail(Object sendDetail) {
		this.sendDetail = sendDetail;
	}

	public Object getView() {
		return view;
	}

	public void setView(Object view) {
		this.view = view;
	}

	public List getList() {
		return list;
	}

	public void setList(List list) {
		this.list = list;
	}

	public void setArchiveService(
			IArchiveService archiveService) {
		this.archiveService = archiveService;
	}

	/**
	 * 查询所有——收文归档
	 * author：张涛
	 * date：2012-2-10
	 * time：下午03:04:15
	 * return：String
	 */
	@SuppressWarnings("unchecked")
	public String list(){
		Map params = new HashMap();
		params.put("sort", this.getRequest().getParameter("sort"));
		params.put("order", this.getRequest().getParameter("order"));
		list = archiveService.queryAll(params);
		return SUCCESS;
	}
	
	/**
	 * 查看详细信息——收文归档
	 * author：张涛
	 * date：2012-2-10
	 * time：下午05:08:10
	 * return：String
	 */
	@SuppressWarnings("unchecked")
	public String view(){
		Map params = new HashMap();
		params.put("ID", this.getRequest().getParameter("id"));
		view = archiveService.view(params);
		return SUCCESS;
		
	}
	
	/**
	 * 查看详细信息——发文归档
	 * author：张涛
	 * date：2012-2-10
	 * time：下午03:08:21
	 * return：String
	 */
	public String sendDetail(){
		Map params = new HashMap();
		params.put("ID", this.getRequest().getParameter("id"));
		sendDetail = archiveService.sendDetail(params);
		return SUCCESS;
		
	}
	
	/**
	 * 查询所有——发文归档
	 * author：张涛
	 * date：2012-2-10
	 * time：下午03:04:15
	 * return：String
	 */
	@SuppressWarnings("unchecked")
	public String sendList(){
		Map params = new HashMap();
		params.put("sort", this.getRequest().getParameter("sort"));
		params.put("order", this.getRequest().getParameter("order"));
		sendList = archiveService.sendQueryAll(params);
		return SUCCESS;
	}
}
